package thread;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public class Demo8_BlockQueue {

    public static void main(String[] args) throws InterruptedException{
        BlockingQueue<String> blk_que = new LinkedBlockingQueue<>(10);
        for(int i = 0; i < 10; ++i){
            blk_que.put("abc");
        }
        System.out.println("队列满");
        blk_que.put("aaaa");
        blk_que.put("没阻塞");
    }
}
